<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>注册</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
    <link rel="stylesheet" href="/static/layui/css/layui.css" th:href="@{/static/layui/css/layui.css}">
    <link rel="stylesheet" href="/static/css/admin.css" th:href="@{/static/css/admin.css}">
    <link rel="stylesheet" href="/static/css/login.css" th:href="@{/static/css/login.css}">
    <link rel="stylesheet" href="/static/css/login.css" th:href="@{/static/css/register.css}">
    <link id="layuicss-layer" rel="stylesheet" href="/static/css/layer.css" th:href="@{../static/css/layer.css}">
    <style>
        label{
            color: #000;
        }

        span{
            color: pink;
            text-align: center;

        }

    </style>
</head>
<body>

<div class="layadmin-user-login layadmin-user-display-show" id="LAY-user-login" style="display: none;background: url('../static/img/ZC.jpg') no-repeat; background-size:100% 100%;">

    <div class="layadmin-user-login-main">
        <div class="layadmin-user-login-box layadmin-user-login-header">
            <h2>颜如玉</h2>
            <p style="color: black">图书管理系统</p>
        </div>
        <form id="formid">
            <div class="layui-form-item">
                <label class="layui-form-label">姓名：</label>
                <div class="layui-input-block">
                    <input type="text" name="title" id="name" required  lay-verify="required" placeholder="请输入姓名" autocomplete="off" class="layui-input">
                    <span style="display: none">请输入姓名!!</span>
                </div>
            </div>
            <div class="layui-form-item" style="line-height: 36px">
                <label class="layui-form-label">性 别：</label>
                <div class="layui-input-block" id="sex">
                    <input type="radio" name="sex" value="1">男
                    <input type="radio" name="sex" value="2" checked>女
                </div>

            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">用户名：</label>
                <div class="layui-input-block">
                    <input type="text" name="title" id="username" required  lay-verify="required" placeholder="请输入用户名" autocomplete="off" class="layui-input">
                    <span style="display: none">请输入用户名!!</span>
                </div>

            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">密 码：</label>
                <div class="layui-input-block">
                    <input type="password" name="title" id="password" required  lay-verify="required" placeholder="请输入密码" autocomplete="off" class="layui-input">
                    <span style="display: none">请输入密码!!</span>
                </div>

            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">确认密码：</label>
                <div class="layui-input-block">
                    <input type="password" name="title" id="repassword" required  lay-verify="required" placeholder="请再次输入密码" autocomplete="off" class="layui-input">
                    <span style="display: none">请确认密码!!</span>
                </div>

            </div>

            <div class="layui-form-item">
                <div class="layui-input-block">
                    <button class="layui-btn" lay-submit lay-filter="formDemo"onclick="return checkForm()">立即提交</button>
                    <button type="reset" class="layui-btn layui-btn-primary" id="New" >重置 </button><br>
                    <span style="line-height: 40px; font-size: 10px;"><a href="login.html"style="color: red">已有账号 点击返回</a> </span>
                </div>
            </div>
        </form>


    </div>

    <div class="layui-trans layadmin-user-login-footer">

        <p>© 2022 <a href="http://www.layui.com/" target="_blank">YRY.com</a></p>

    </div>


</div>
<script src="/static/js/jquery-1.11.3.min.js" th:src="@{/static/js/jquery-1.11.3.min.js}"></script>
<script src="/static/layui/layui.js" th:src="@{/static/layui/layui.js}"></script>

</body>
<script>
    function checkForm(){

        $("#name+span").hide();
        $("#username+span").hide();
        $("#password+span").hide();
        $("#repassword+span").hide();


        var name=$("#name").val();
        var sex=$("#sex").val();
        var username=$("#username").val();
        var password=$("#password").val();
        var repassword=$("#repassword").val();
        if (name==""){
            $("#name+span").show();
        }
        if (username==""){
            $("#username+span").show();
        }
        if (password==""){
            $("#password+span").show();
        }
        if (repassword==""){
            $("#repassword+span").show();
        }
    }





</script>

</html>